package com.xh.baselibrary.utils

import junit.framework.TestCase
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito
import org.powermock.api.mockito.PowerMockito
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner

/**
 * Copyright (C), 2022, GDC VR Team
 * Author: lxie
 * Date: 2022/7/29
 * Description:
 * History:
 * <author>    <time>     <version>  <desc>
 * lxie    2022/7/29      v0.1       FirstVersion
</desc></version></time></author> */
@RunWith(PowerMockRunner::class)
@PrepareForTest(StringUtils::class)
class StringUtilsTest {

    @Test
    fun testIsEmail() {
        PowerMockito.mockStatic(StringUtils::class.java)
        PowerMockito.`when`(StringUtils.isEmail(Mockito.anyString())).thenReturn(false)
        Assert.assertFalse(StringUtils.isEmail(""))
    }

}